Mega Code Archive
Regular Expressions
1) [
2) [ characters ]
3) [[
4) {n} or {m,n} notation provides a more general way of writing regular expressions
5) Characters and classes used by the REGEXP and NOT REGEXP operators (or RLIKE and NOT RLIKE, which are synonyms)
6) Get first name with either av or am
7) Get first name with one or more J character
8) Get first name with zero for more instances of the sequence Ja
9) Get first name with zero or more J characters
10) Get first name with zero or one J character
11) Get the first name ending with n
12) Get the first name starting with J
13) Match any character (including carriage return and newline)
14) Match any sequence of one or more a characters
15) Match any sequence of zero or more a characters
16) Match either of the sequences de or abc
17) Match either zero or one a character
18) Match the beginning and end of words, respectively( [[
19) Match the beginning of a string
20) Match the end of a string
21) Match zero or more instances of the sequence abc
22) Matches any character that is (or is not, if ^ is used) either a, b, c, d or X
23) Pattern Matching
24) REGEXP ^[a-f]
25) REGEXP ^[mn] [sz]$
26) Regular Expressions
27) SELECT ~ REGEXP [[ ~ ]]
28) SELECT ~ REGEXP [[ tilde ]]
29) SELECT 1+2 REGEXP 1+2
30) SELECT abcda REGEXP ^[^a-dXYZ]+$
31) SELECT abcde REGEXP a[bcd]{1,10}e
32) SELECT abcde REGEXP a[bcd]{3}e
33) SELECT abcdeX REGEXP ^[^a-dXYZ]+$
34) SELECT aXbc REGEXP ^[^a-dXYZ]+$; (3)
35) SELECT aXbc REGEXP ^[a-dXYZ]$
36) SELECT aXbc REGEXP ^[a-dXYZ]+$; (2)
37) To find names beginning with J
38) To find names beginning with J, use ^ to match the beginning of the name
39) To find names containing an a
40) To find names containing an e, use this query
41) To find names containing exactly five characters
42) To find names containing exactly five characters using {n}
43) To find names containing exactly five characters, use five instances of the _ pattern character
44) To find names ending with es, use $ to match the end of the name
45) To find names ending with on
46) To matches only lowercase b at the beginning of a name